//
//  LXStatisticsListTableViewCell.m
//  ZuLinProject
//
//  Created by bancheng on 2022/9/5.
//  Copyright © 2022 LX_App. All rights reserved.
//

#import "LXStatisticsListTableViewCell.h"
#import "LXRepairModel.h"
#import "LXDelayModel.h"
#import "LXCarCheckModel.h"
#import "LXAgencyFeeModel.h"
#import "LXViolationModel.h"
#import "LXLoanModel.h"
#import "LXPlateModel.h"

@implementation LXStatisticsListTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self.backView addCorner:4];
    [self.backView_cell2 addCorner:4];
    [self.backView_cell3 addCorner:4];
    [self.backView_cell4 addCorner:4];
    [self.backView_cell5 addCorner:4];

}
- (void)setWyclModel:(CheLiangModel *)wyclModel{
    _wyclModel = wyclModel;
    
    self.label1_cell4.text = [NSString stringWithFormat:@"%@ 丨 %@ %@",wyclModel.carNum,[NSString stringWithNull:wyclModel.carBrand],[NSString stringWithNull:wyclModel.carMode]];
    
    self.label2_cell4.text = [NSString stringWithFormat:@"客户 %@",[NSString stringWithNull:wyclModel.customerName]];
    [self.label2_cell4 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"客户"];
    
    self.label3_cell4.text = [NSString stringWithFormat:@"违约原因 %@",[NSString stringWithNull:wyclModel.cause]];
    [self.label3_cell4 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"违约原因"];
    
    
    self.label4_cell4.hidden = YES;
    self.label5_cell4.hidden = YES;
    self.label6_cell4.hidden = YES;
    
}

- (void)setXnjModel:(CheLiangModel *)xnjModel{
    _xnjModel = xnjModel;
    
    self.label1_cell4.text = [NSString stringWithFormat:@"%@ | %@",xnjModel.carNum,xnjModel.enterpriseName];
    [self.label1_cell4 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"|"];
    
    self.label2_cell4.text = [NSString stringWithFormat:@"品牌车型 %@ %@",xnjModel.carBrand,xnjModel.carMode];
    [self.label2_cell4 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"品牌车型"];
    
    self.label3_cell4.text = [NSString stringWithFormat:@"年检到期 %@",xnjModel.nextCheckDate];
    [self.label3_cell4 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"年检到期"];
    
    
    self.label4_cell4.hidden = YES;
    self.label5_cell4.hidden = YES;
    self.label6_cell4.hidden = YES;

}
- (void)setJjdqkhModel:(CheLiangModel *)jjdqkhModel{
    _jjdqkhModel = jjdqkhModel;
    
    
    self.label1_cell2.text = [NSString stringWithNull:jjdqkhModel.customerName];
    
    
    self.label2_cell2.text = [NSString stringWithFormat:@"车牌号   %@",jjdqkhModel.carNum];
    [self.label2_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"车牌号"];
    
    self.label3_cell2.text = [NSString stringWithFormat:@"品牌车型   %@ %@",[NSString stringWithNull:jjdqkhModel.carBrand],[NSString stringWithNull:jjdqkhModel.carMode]];
    [self.label3_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"品牌车型"];

    
   
    
    self.label4_cell2.text = [NSString stringWithFormat:@"合约到期 %@",[NSString stringWithNull:jjdqkhModel.endTime]];
    [self.label4_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"合约到期"];

    
    self.label5_cell2.text = [NSString stringWithFormat:@"月租金 %@",[NSString toTen:jjdqkhModel.rent]];
    [self.label5_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"月租金"];

    
    if (jjdqkhModel.signType == 1) {
        self.label6_cell2.text = @"租车";
        self.widthCons_cell2.constant = 30;
    }
    else if(jjdqkhModel.signType == 2){
        self.label6_cell2.text = @"购车";
        self.widthCons_cell2.constant = 30;
    }
    else if(jjdqkhModel.signType == 3){
        self.label6_cell2.text = @"以租代购";
        self.widthCons_cell2.constant = 53;
    }
    [self.label6_cell2 addCorner:1];
   
    self.label6_cell2.backgroundColor = [ColorWith3C6CFC colorWithAlphaComponent:0.1];
    
    self.btn7_cell2.hidden = NO;
    
    
}
- (void)setXjzkhModel:(CheLiangModel *)xjzkhModel{
    _xjzkhModel = xjzkhModel;
    
    self.label1_cell2.text = [NSString stringWithNull:xjzkhModel.customerName];
    
    
    self.label2_cell2.text = [NSString stringWithFormat:@"车牌号   %@",xjzkhModel.carNum];
    [self.label2_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"车牌号"];
    
    self.label3_cell2.text = [NSString stringWithFormat:@"品牌车型   %@ %@",[NSString stringWithNull:xjzkhModel.carBrand],[NSString stringWithNull:xjzkhModel.carMode]];
    [self.label3_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"品牌车型"];

    
   
    
    self.label4_cell2.text = [NSString stringWithFormat:@"应交租日期 %@",[NSString stringWithNull:xjzkhModel.exceptReceiveDate]];
    [self.label4_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"应交租日期"];

    
    self.label5_cell2.text = [NSString stringWithFormat:@"月租金 %@",[NSString toTen:xjzkhModel.amount]];
    [self.label5_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"月租金"];

    
    if (xjzkhModel.signType == 1) {
        self.label6_cell2.text = @"租车";
        self.widthCons_cell2.constant = 30;
    }
    else if(xjzkhModel.signType == 2){
        self.label6_cell2.text = @"购车";
        self.widthCons_cell2.constant = 30;
    }
    else if(xjzkhModel.signType == 3){
        self.label6_cell2.text = @"以租代购";
        self.widthCons_cell2.constant = 53;
    }
    [self.label6_cell2 addCorner:1];
   
    self.label6_cell2.backgroundColor = [ColorWith3C6CFC colorWithAlphaComponent:0.1];
    
    self.btn7_cell2.hidden = NO;
    
    
}
- (void)setTyjkhModel:(CheLiangModel *)tyjkhModel{
    _tyjkhModel = tyjkhModel;
    
    self.label1_cell2.text = [NSString stringWithFormat:@"%@ | %@",tyjkhModel.carNum,tyjkhModel.customerName];
    
    self.label2_cell2.text = [NSString stringWithFormat:@"品牌车型   %@ %@",[NSString stringWithNull:tyjkhModel.carBrand],[NSString stringWithNull:tyjkhModel.carModel]];
    [self.label2_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"品牌车型"];
    
    self.label3_cell2.text = [NSString stringWithFormat:@"退车日期 %@",[NSString stringWithNull:tyjkhModel.carReturnTime]];
    [self.label3_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"退车日期"];

    
    self.label4_cell2.text = [NSString stringWithFormat:@"应退押金日期 %@",tyjkhModel.exceptPaidDate];
    [self.label4_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"应退押金日期"];

    
    
    self.label5_cell2.text = [NSString stringWithFormat:@"押金 %@",[NSString toTen:tyjkhModel.amount]];
    [self.label5_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"押金"];
    
    self.label6_cell2.text = @"";
//    if (tyjkhModel.signType == 1) {
//        self.label6_cell2.text = @"租车";
//        self.widthCons_cell2.constant = 30;
//    }
//    else if(tyjkhModel.signType == 2){
//        self.label6_cell2.text = @"购车";
//        self.widthCons_cell2.constant = 30;
//    }
//    else if(tyjkhModel.signType == 3){
//        self.label6_cell2.text = @"以租代购";
//        self.widthCons_cell2.constant = 53;
//    }
    

    
    self.btn7_cell2.hidden = NO;
}
- (void)setXtyjModel:(CheLiangModel *)xtyjModel{
    _xtyjModel = xtyjModel;
    
    
    self.label1_cell2.text = xtyjModel.customerName;
    
    self.label2_cell2.text = [NSString stringWithFormat:@"车牌号   %@",[NSString stringWithNull:xtyjModel.carNum]];
    [self.label2_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"车牌号"];

    
    self.label3_cell2.text = [NSString stringWithFormat:@"品牌车型   %@ %@",[NSString stringWithNull:xtyjModel.carBrand],[NSString stringWithNull:xtyjModel.carMode]];
    [self.label3_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"品牌车型"];
    
    self.label4_cell2.text = [NSString stringWithFormat:@"退车日期 %@",xtyjModel.carReturnTime];
    [self.label4_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"退车日期"];

    
    self.label5_cell2.text = [NSString stringWithFormat:@"押金 %@",[NSString toTen:xtyjModel.amount]];
    [self.label5_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"押金"];
    
    self.label6_cell2.backgroundColor = [ColorWith3C6CFC colorWithAlphaComponent:0.1];
    
    if (xtyjModel.signType == 1) {
        self.label6_cell2.text = @"租车";
        self.widthCons_cell2.constant = 30;
    }
    else if(xtyjModel.signType == 2){
        self.label6_cell2.text = @"购车";
        self.widthCons_cell2.constant = 30;
    }
    else if(xtyjModel.signType == 3){
        self.label6_cell2.text = @"以租代购";
        self.widthCons_cell2.constant = 53;
    }
    else {
        self.label6_cell2.text = @"";
        self.label6_cell2.backgroundColor = UIColor.clearColor;
    }
    
    self.btn7_cell2.hidden = NO;

}
- (void)setCxclModel:(CheLiangModel *)cxclModel{
    _cxclModel = cxclModel;
    
    self.label1_cell2.text = [NSString stringWithFormat:@"%@",cxclModel.carNum];
    
    self.label2_cell2.text = [NSString stringWithFormat:@"品牌车型   %@ %@",cxclModel.carBrand,cxclModel.carMode];
    [self.label2_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"品牌车型"];
    
    self.label3_cell2.text = [NSString stringWithFormat:@"出险时间 %@",cxclModel.occurrenceTime];
    [self.label3_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"出险时间"];

    
    self.label4_cell2.text = [NSString stringWithFormat:@"责任方 %@",cxclModel.chargeSide];
    [self.label4_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"责任方"];

    
    
    self.label5_cell2.text = [NSString stringWithFormat:@"客户姓名 %@",[NSString stringWithNull:cxclModel.customerName]];
    [self.label5_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"客户姓名"];
    
    
    
    self.label6_cell2.text = [NSString stringWithFormat:@"%@元",[NSString stringWithNull:cxclModel.thirdAmount]];
    self.widthCons_cell2.constant = 100;
    self.label6_cell2.textAlignment = NSTextAlignmentRight;
    self.label6_cell2.textColor = ColorWithFF921C;
    
    self.btn7_cell2.hidden = YES;
    
}
- (void)setWxzclModel:(CheLiangModel *)wxzclModel{
    _wxzclModel = wxzclModel;
    
    
    self.label1_cell2.text = [NSString stringWithNull:wxzclModel.carNum];
    
    self.label2_cell2.text = [NSString stringWithFormat:@"品牌车型   %@ %@",[NSString stringWithNull:wxzclModel.carBrand],[NSString stringWithNull:wxzclModel.carMode]];
    [self.label2_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"品牌车型"];
    
    self.label3_cell2.text = [NSString stringWithFormat:@"维修时间 %@",[NSString stringWithNull:wxzclModel.intoTime]];
    [self.label3_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"维修时间"];

    
    self.label4_cell2.text = [NSString stringWithFormat:@"修理厂 %@",[NSString stringWithNull:wxzclModel.repairCompanyName]];
    [self.label4_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"修理厂"];

    
    
    self.label5_cell2.text = [NSString stringWithFormat:@"客户姓名 %@",[NSString stringWithNull:wxzclModel.customerName]];
    [self.label5_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"客户姓名"];
    
    self.label6_cell2.text = [NSString stringWithFormat:@"%@元",[NSString toTen:wxzclModel.repairAmount]];
    self.label6_cell2.textColor = ColorWithFF921C;
    self.label6_cell2.textAlignment = NSTextAlignmentRight;
    self.widthCons_cell2.constant = 100;
    self.btn7_cell2.hidden = YES;
    
    
}
- (void)setTzclModel:(CheLiangModel *)tzclModel{
    _tzclModel = tzclModel;
    
    self.label1_cell3.text = [NSString stringWithFormat:@"%@ | %@",tzclModel.carNumber,tzclModel.customerName];
    [self.label1_cell3 addAttributesArray:@[TextAttrCorlor(ColorWithAAAAAA),TextAttrCorlor(Color333)] forStringArray:@[@"|",tzclModel.customerName] size:14];
    
    self.label2_cell3.text = [NSString stringWithFormat:@"签约日期   %@",tzclModel.beginTime];
    [self.label2_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"签约日期"];
    
    
    self.label3_cell3.text = [NSString stringWithFormat:@"租金押金 %@ / %@",[NSString toTen:tzclModel.rent],[NSString toTen:tzclModel.depost]];
    [self.label3_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"租金押金"];

    
    self.label4_cell3.text = [NSString stringWithFormat:@"合同日期 %@",tzclModel.signDate];
    [self.label4_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"合同日期"];

    
    
    self.label5_cell3.text = @"已退车";
    self.label5_cell3.textColor = ColorWithFF921C;
    self.label5_cell3.backgroundColor = [ColorWithFF921C colorWithAlphaComponent:0.1];
    
    self.label6_cell3.text = @"";
    
    
}
- (void)setTcclModel:(CheLiangModel *)tcclModel{
    _tcclModel = tcclModel;
    
    
    self.label1_cell2.text = [NSString stringWithNull:tcclModel.carNum];

    self.label2_cell2.text = [NSString stringWithFormat:@"品牌车型   %@ %@",[NSString stringWithNull:tcclModel.carBrand],[NSString stringWithNull:tcclModel.carMode]];
    [self.label2_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"品牌车型"];
    
    
    self.label3_cell2.text = [NSString stringWithFormat:@"客户姓名 %@",[NSString stringWithNull:tcclModel.customerName]];
    [self.label3_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"客户姓名"];

    
    self.label4_cell2.text = [NSString stringWithFormat:@"退车日期 %@",tcclModel.carReturnTime];
    [self.label4_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"退车日期"];

    
    self.label5_cell2.text = [NSString stringWithFormat:@"处理人 %@",tcclModel.carManagerName];
    [self.label5_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"处理人"];

    
    self.label6_cell2.text = [NSString stringWithFormat:@"%@天",tcclModel.returnDay];
    self.label6_cell2.textColor = ColorWithFF921C;
    self.label6_cell2.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
    
    self.label7_cell2.text = @"已退车";
    self.label7_cell2.textColor = ColorWithAAAAAA;
    
}
- (void)setXbyclModel:(CheLiangModel *)xbyclModel{
    _xbyclModel = xbyclModel;
    
    self.label1_cell3.text = [NSString stringWithFormat:@"%@ | %@",xbyclModel.carNum,xbyclModel.enterpriseName];
    [self.label1_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"|"];
    
    self.label2_cell3.text = [NSString stringWithFormat:@"品牌车型 %@ %@",xbyclModel.carBrand,xbyclModel.carMode];
    [self.label2_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"品牌车型"];
    
    self.label3_cell3.text = [NSString stringWithFormat:@"下次保养时间 %@",[NSString stringWithNull:xbyclModel.nextMaintainDate]];
    [self.label3_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"下次保养时间"];
    
    self.label4_cell3.text = [NSString stringWithFormat:@"下次保养公里数 %@",[NSString stringWithNull:xbyclModel.nextMaintainKm]];
    [self.label4_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"下次保养公里数"];

    self.label5_cell3.hidden = YES;
    self.label6_cell3.hidden = YES;
    
    
    
}

- (void)setJzkhModel:(CheLiangModel *)jzkhModel{
    _jzkhModel = jzkhModel;
    
    self.label1_cell2.text = [NSString stringWithFormat:@"%@ | %@",[NSString stringWithNull:jzkhModel.carNumber],[NSString stringWithNull:jzkhModel.customerName]];

    self.label2_cell2.text = [NSString stringWithFormat:@"签约日期   %@",[NSString stringWithNull:jzkhModel.signDate]];
    [self.label2_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"签约日期"];
    
    
    self.label3_cell2.text = [NSString stringWithFormat:@"租金押金 %@ / %@",[NSString toTen:jzkhModel.amount],[NSString toTen:jzkhModel.depost]];
    [self.label3_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"租金押金"];

    
    self.label4_cell2.text = [NSString stringWithFormat:@"合同日期 %@ 至 %@",[NSString stringWithNull:jzkhModel.beginTime],[NSString stringWithNull:jzkhModel.endTime]];
    [self.label4_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"合同日期"];

    
    self.label5_cell2.text = [NSString stringWithFormat:@"应交租日期 %@",jzkhModel.exceptReceiveDate];
    [self.label5_cell2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"应交租日期"];

    
    if ([jzkhModel.receiveAmount doubleValue] > 0) {
        self.label6_cell2.text = @"租金已交";
        self.label6_cell2.textColor = ColorWithFF921C;
        self.label6_cell2.backgroundColor = [ColorWithFF921C colorWithAlphaComponent:0.1];
    }
    else {
        self.label6_cell2.text = @"租金未交";
        self.label6_cell2.textColor = ColorWithEA545A;
        self.label6_cell2.backgroundColor = [ColorWithEA545A colorWithAlphaComponent:0.1];

    }
    self.widthCons_cell2.constant = 55;
//    self.label6_cell2.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
    
    self.label7_cell2.text = @"";
    self.btn7_cell2.hidden = NO;
    
    
}


- (void)setXxbclModel:(CheLiangModel *)xxbclModel{
    _xxbclModel = xxbclModel;
    
    self.label1_cell3.text = [NSString stringWithFormat:@"%@ | %@",xxbclModel.carNum,xxbclModel.enterpriseName];
    [self.label1_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"|"];
    
    self.label2_cell3.text = [NSString stringWithFormat:@"品牌车型 %@ %@",xxbclModel.carBrand,xxbclModel.carMode];
    [self.label2_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"品牌车型"];
    
    self.label3_cell3.text = [NSString stringWithFormat:@"交强险到期 %@",[NSString stringWithNull:xxbclModel.compulsoryInsuranceEndDate]];
    [self.label3_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"交强险到期"];
    
    self.label4_cell3.text = [NSString stringWithFormat:@"商业险到期 %@",[NSString stringWithNull:xxbclModel.businessInsuranceEndDate]];
    [self.label4_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"商业险到期"];

    self.label5_cell3.hidden = YES;
    self.label6_cell3.hidden = YES;

    
}

- (void)setRepairModel:(LXRepairModel *)repairModel{
    _repairModel = repairModel;
    
    
    self.label1_cell3.text = repairModel.carNum;
    
    self.label2_cell3.text = [NSString stringWithFormat:@"租车客户  %@",[NSString stringWithNull:repairModel.driverName]];
    [self.label2_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"租车客户"];
    
    self.label3_cell3.text = [NSString stringWithFormat:@"修理厂   \t%@",repairModel.repairCompanyName];
    [self.label3_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"修理厂"];
    

    self.label4_cell3.text = [NSString stringWithFormat:@"备注   \t%@",[NSString stringWithNull:repairModel.remark]];
    [self.label4_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"备注"];
    
    
    if (repairModel.repairStatus ==1) {
        self.label5_cell3.text = @"维修中";
        self.label5_cell3.textColor = ColorWithEA545A;
        self.label5_cell3.backgroundColor = [ColorWithEA545A colorWithAlphaComponent:0.1];
    }
    else {
        self.label5_cell3.text = @"已修好";
        self.label5_cell3.textColor = ColorWith3C6CFC;
        self.label5_cell3.backgroundColor = [ColorWith3C6CFC colorWithAlphaComponent:0.1];
    }
    
    self.label6_cell3.text = [NSString stringWithFormat:@"%@元",repairModel.repairAmount];
    self.label6_cell3.textColor = ColorWithFF921C;
    self.label6_cell3.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
    [self.label6_cell3 addAttributes:TextAttrCorlor(ColorWithFF921C) forText:@"元" size:[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]];
    
    self.label7_cell3.text = @"维修金额";
    
    
}

- (void)setDelayModel:(LXDelayModel *)delayModel{
    _delayModel = delayModel;
    
    
    self.label1_cell3.text = delayModel.carNumber;
    
    self.label2_cell3.text = [NSString stringWithFormat:@"租车客户  %@",delayModel.customerName];
    [self.label2_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forText:@"租车客户" size:[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]];
    
    
    self.label3_cell3.text = [NSString stringWithFormat:@"延期天数  %@天",delayModel.delayDay];
    [self.label3_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forText:@"延期天数" size:[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]];
    
    self.label4_cell3.text = [NSString stringWithFormat:@"备       注  %@",[NSString stringWithNull:delayModel.remark]];
    [self.label4_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forText:@"备       注" size:[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]];
    

    self.label5_cell3.text = @"";
    self.label6_cell3.text = @"";
    self.label7_cell3.text = @"";
}


- (void)setCheckModel:(LXCarCheckModel *)checkModel{
    _checkModel = checkModel;
    
    self.label1_cell4.text = checkModel.carNumber;
    self.label2_cell4.text = [NSString stringWithFormat:@"验车时间  %@",checkModel.createTime.length>=10?[checkModel.createTime substringToIndex:10]:checkModel.createTime];
    [self.label2_cell4 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forText:@"验车时间" size:[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]];

    self.label3_cell4.text = [NSString stringWithFormat:@"备       注  %@",[NSString stringWithNull:checkModel.remark]];
    [self.label3_cell4 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forText:@"备       注" size:[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]];
    
    self.label4_cell4.text = [NSString stringWithFormat:@"%@Km",checkModel.mileage];
    self.label4_cell4WidthCons.constant = 300;
    self.label4_cell4.textAlignment = NSTextAlignmentRight;
    self.label4_cell4.textColor = ColorWithFF921C;
    self.label4_cell4.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
    
    
    self.label5_cell4.text = @"";
    self.label6_cell4.hidden = NO;
    [self.label6_cell4 addCorner:2];
    if (checkModel.type == 1) {
        self.label6_cell4.text = @"发车";
        self.label6_cell4.textColor = ColorWith3C6CFC;
        self.label6_cell4.backgroundColor = [ColorWith3C6CFC colorWithAlphaComponent:0.1];
    }
    else if(checkModel.type == 2){
        self.label6_cell4.text = @"退车";
        self.label6_cell4.textColor = ColorWithEA545A;
        self.label6_cell4.backgroundColor = [ColorWithEA545A colorWithAlphaComponent:0.1];
    }
    else {
        self.label6_cell4.hidden = YES;
    }
    
}
- (void)setAgencyModel:(LXAgencyFeeModel *)agencyModel{
    _agencyModel = agencyModel;
    
    
    self.label1_cell3.text = agencyModel.carNumber;
    
    self.label2_cell3.text = [NSString stringWithFormat:@"客户    %@",agencyModel.customerName];
    [self.label2_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"客户"];
    
    self.label3_cell3.text = [NSString stringWithFormat:@"对方公司    %@",agencyModel.payeeName];
    [self.label3_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"对方公司"];

    self.label4_cell3.text = [NSString stringWithFormat:@"中介费    %@",[NSString toTen:agencyModel.amount]];
    [self.label4_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"中介费"];
    
    
    if ([agencyModel.paidAmount intValue] > 0) {
        self.label5_cell3.text = @"已支付";
        self.label5_cell3.backgroundColor = [ColorWith3C6CFC colorWithAlphaComponent:0.1];
        self.label5_cell3.textColor = ColorWith3C6CFC;
    }
    else {
        self.label5_cell3.text = @"未支付";
        self.label5_cell3.backgroundColor = [ColorWithEA545A colorWithAlphaComponent:0.1];
        self.label5_cell3.textColor = ColorWithEA545A;
    }
    self.label6_cell3.text = @"";

    
}
- (void)setReturnModel:(CheLiangModel *)returnModel{
    
    self.label1.text = returnModel.carNumber;
    
    
    self.label2.text = [NSString stringWithFormat:@"客户姓名   %@",[NSString stringWithNull:returnModel.customerName]];
    [self.label2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"客户姓名"];
    
    self.label3.text = [NSString stringWithFormat:@"退车日期 %@",returnModel.carReturnTime];
    [self.label3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"退车日期"];
    
    
    if ([NSString dateCompare:[NSString getNowDateWithFormat:@"yyyy-MM-dd"] secondTime:returnModel.carReturnTime] <= 0) {
        self.label4.text = [NSString stringWithFormat:@"退车天数 %@天",@(1)];
    }
    else {
        self.label4.text = [NSString stringWithFormat:@"退车天数 %@天",@([NSString dateCompare:[NSString getNowDateWithFormat:@"yyyy-MM-dd"] secondTime:returnModel.carReturnTime])];

    }
    [self.label4 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"退车天数"];
    
    
    self.label5.text = [NSString stringWithFormat:@"处理人   %@",[NSString stringWithNull:returnModel.carManagerName]];
    [self.label5 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"处理人"];

    
    self.label6.text = @"已退车";
    self.label6.backgroundColor = [ColorWith3C6CFC colorWithAlphaComponent:0.1];
    self.label6.textColor  = ColorWith3C6CFC;
    
}
- (void)setViolationModel:(LXViolationModel *)violationModel{
    _violationModel =  violationModel;
    
    self.label1_cell4.text = [NSString stringWithFormat:@"%@",violationModel.carNum];
    
    self.label2_cell4.text = [NSString stringWithFormat:@"客户     %@",violationModel.customerName];
    [self.label2_cell4 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"客户"];
    
    self.label3_cell4.text = [NSString stringWithFormat:@"违约原因 %@",violationModel.cause];
    [self.label3_cell4 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"违约原因"];
    
    
    self.label4_cell4.hidden = YES;
    self.label5_cell4.hidden = YES;
    self.label6_cell4.hidden = YES;
    
}
- (void)setDkclModel:(CheLiangModel *)dkclModel{
    _dkclModel = dkclModel;
    
    self.label1.text = [NSString stringWithNull:dkclModel.carNum];
    
    self.label2.text = [NSString stringWithFormat:@"品牌车型   %@ %@",dkclModel.carBrand,dkclModel.carMode];
    [self.label2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"品牌车型"];
    
    self.label3.text = [NSString stringWithFormat:@"创建日期   %@",[dkclModel.createTime length]>=10?[dkclModel.createTime substringToIndex:10]:dkclModel.createTime];
    [self.label3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"创建日期"];

    
    self.label4.text = [NSString stringWithFormat:@"还款金额   %@",[NSString toTen:dkclModel.monthlyPayment]];
    [self.label4 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"还款金额"];

    self.label5.text = [NSString stringWithFormat:@"还款日      每月%@日",dkclModel.duoDate];
    [self.label5 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"还款日"];

    if ([dkclModel.paidPeriod isEqualToString:dkclModel.totalPeroid]) {
        self.label6.text = @"已结清";
        self.label6.backgroundColor = [ColorWith3C6CFC colorWithAlphaComponent:0.1];
        self.label6.textColor = [ColorWith3C6CFC colorWithAlphaComponent:0.8];
    }
    else {
        self.label6.text = @"未结清";
        self.label6.backgroundColor = [ColorWithEA545A colorWithAlphaComponent:0.1];
        self.label6.textColor = [ColorWithEA545A colorWithAlphaComponent:0.8];
    }
   
    
    self.label10.text = [NSString stringWithFormat:@"%@/%@期",dkclModel.paidPeriod,dkclModel.totalPeroid];
    self.label10.textColor = ColorWith333333;
    [self.label10 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:dkclModel.paidPeriod size:16];
    
}

- (void)setLoanModel:(LXLoanModel *)loanModel{
    _loanModel = loanModel;
    
    
    self.label1.text = [NSString stringWithNull:loanModel.carNumber];
    
    self.label2.text = [NSString stringWithFormat:@"品牌车型   %@",loanModel.carModel];
    [self.label2 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"品牌车型"];
    
    self.label3.text = [NSString stringWithFormat:@"创建日期   %@",[loanModel.createTime length]>=10?[loanModel.createTime substringToIndex:10]:loanModel.createTime];
    [self.label3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"创建日期"];

    
    self.label4.text = [NSString stringWithFormat:@"还款金额   %@",[NSString toTen:loanModel.monthlyPayment]];
    [self.label4 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"还款金额"];

    self.label5.text = [NSString stringWithFormat:@"还款日      每月%@日",loanModel.duoDate];
    [self.label5 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"还款日"];

    if (loanModel.paidPeriods == loanModel.totalPeriods) {
        self.label6.text = @"已结清";
        self.label6.backgroundColor = [ColorWith3C6CFC colorWithAlphaComponent:0.1];
        self.label6.textColor = [ColorWith3C6CFC colorWithAlphaComponent:0.8];
    }
    else {
        self.label6.text = @"未结清";
        self.label6.backgroundColor = [ColorWithEA545A colorWithAlphaComponent:0.1];
        self.label6.textColor = [ColorWithEA545A colorWithAlphaComponent:0.8];
    }
    
   NSString *periods = [NSString stringWithFormat:@"%@/%@期",@(loanModel.paidPeriods),@(loanModel.totalPeriods)];
    NSMutableAttributedString * attributedString = [[NSMutableAttributedString alloc] initWithString:periods];
    
    NSString *paidPeriods = [NSString stringWithFormat:@"%@",@(loanModel.paidPeriods)];
    
    [attributedString addAttributes:TextAttrCorlor(ColorWithFF921C) range:NSMakeRange(0, paidPeriods.length)];
    [attributedString addAttribute:NSFontAttributeName value:FONT_SIZE(16) range:NSMakeRange(0, paidPeriods.length)];

    
     
    self.label10.textColor = ColorWith333333;
    
    self.label10.attributedText = attributedString;
    
    
    
//    [self.label10 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:[NSString stringWithFormat:@"%@",@(loanModel.paidPeriods)] size:16];
    

}
-(void)setPlateModel:(LXPlateModel *)plateModel{
    _plateModel = plateModel;
    
    self.label1_cell3.text = [NSString stringWithNull:plateModel.carNum];
    
    self.label2_cell3.text = [NSString stringWithFormat:@"牌照所属     %@",plateModel.ownerCompanyName];
    [self.label2_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"牌照所属"];
    
    
    self.label3_cell3.text = [NSString stringWithFormat:@"车牌使用时间  %@ 至 %@(共%@年)",plateModel.startUseDate,plateModel.endUseDate,@(plateModel.totalYear)];
    [self.label3_cell3 addAttributesArray:@[TextAttrCorlor(ColorWithAAAAAA),TextAttrCorlor(ColorWithAAAAAA)] forStringArray:@[@"车牌使用时间",@"至"] size:13];

    
    self.label4_cell3.text = [NSString stringWithFormat:@"牌照费  %@/年",[NSString toTen:plateModel.price]];
    [self.label4_cell3 addAttributes:TextAttrCorlor(ColorWithAAAAAA) forString:@"牌照费"];
    self.label5_cell3.adjustsFontSizeToFitWidth = YES;

    if (plateModel.status == 1) {
        self.label5_cell3.text = @"逾期未支付";
        self.widthCons_cell3.constant = 75;
        self.label5_cell3.textColor = ColorWithEA545A;
        self.label5_cell3.backgroundColor  = [ColorWithEA545A colorWithAlphaComponent:0.1];
        
    }
    else if (plateModel.status == 2){
        self.label5_cell3.text = @"未支付";
        self.widthCons_cell3.constant = 35;
        self.label5_cell3.textColor = ColorWithEA545A;
        self.label5_cell3.backgroundColor  = [ColorWithEA545A colorWithAlphaComponent:0.1];
    }
    else if (plateModel.status == 3){
        self.label5_cell3.text = @"已付清";
        self.widthCons_cell3.constant = 35;
        self.label5_cell3.textColor = ColorWith3C6CFC;
        self.label5_cell3.backgroundColor  = [ColorWith3C6CFC colorWithAlphaComponent:0.1];
    }
    else if (plateModel.status == 4){
        self.widthCons_cell3.constant = 70;
        self.label5_cell3.text = [NSString stringWithFormat:@"第%@期已付",@(plateModel.maxPaid)];
        self.label5_cell3.textColor = ColorWith3C6CFC;
        self.label5_cell3.backgroundColor  = [ColorWith3C6CFC colorWithAlphaComponent:0.1];
    }
    
   
    
    
}
@end
